﻿
<div class="panel panel-default padding-empty">
    <div class="panel-body padding-empty">
        <ol class="breadcrumb margin-empty">
            <li class="breadcrumb-color"><i class="fa fa-home"></i>&nbsp;主页</li>
            <li><a href="#/examPlan/list" class="breadcrumb-link">考试计划管理</a></li>
            <li class="active">{{planName}} - 查看明细</li>
        </ol>
    </div>
</div>

<div class="panel panel-default">
    <!--<div class="panel-heading">
        <h3 class="modal-title">
            <i class="fa fa-file-text-o"></i>
            {{planName}} - 查看明细
            &nbsp;
            <button class="btn btn-turquoise btn-xs" onclick="javascript: history.go(-1);" title="返回上一页" style="margin-bottom: 0;">
                <i class="fa fa-chevron-left"></i>
            </button>
        </h3>
    </div>-->

    <div class="panel-body">
        <form class="form-inline">
            <div class="form-group" ng-hide="isAnyTime">
                <label class="control-label">场次：</label>
                <select ng-model="curScene" ng-options="item.examSceneName for item in sceneList" class="form-control selectMaxWidth"></select>
            </div>

            <div class="form-group" ng-hide="isAnyTime">
                <label class="control-label">考场：</label>
                <select ng-model="curRoom" ng-options="item.examRoomName for item in roomList" class="form-control selectMaxWidth"></select>
            </div>

            <div class="form-group">
                <label class="control-label">科目：</label>
                <select ng-model="curSubject" ng-options="item.subjectName for item in subjectList" class="form-control selectMaxWidth"></select>
            </div>

            &nbsp;
            &nbsp;

            <button class="btn btn-turquoise" ng-click="query();" style="margin-bottom: 0;">
                <i class="fa fa-search"></i>
                搜索
            </button>
        </form>

        <br />
        <table class="table responsive table-bordered table-hover">
            <thead>
                <tr class="active">
                    <th class="text-center">#</th>
                    <th ng-hide="isAnyTime">场次</th>
                    <th ng-hide="isAnyTime">考场</th>
                    <th>科目</th>
                    <th>考生数</th>
                    <th ng-hide="isAnyTime">考试开始时间</th>
                    <th ng-hide="isAnyTime">考试结束时间</th>
                    <th ng-show="isAnyTime">计划开始时间</th>
                    <th ng-show="isAnyTime">计划结束时间</th>
                    <th ng-hide="isOfficial">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="item in list">
                    <!--序号-->
                    <td class="text-center">
                        {{$index+1}}
                    </td>
                    <!--场次-->
                    <td ng-hide="isAnyTime">
                        {{item.examSceneName}}
                    </td>
                    <!--考场-->
                    <td ng-hide="isAnyTime" title="{{item.examRoomName}}">
                        {{item.examRoomName | formatLongStr}}
                    </td>
                    <!--科目-->
                    <td title="{{item.subjectName}}">
                        {{item.subjectName | formatLongStr}}
                    </td>
                    <!--考生数-->
                    <td>
                        {{item.examStudentCount}}
                    </td> 
                    <!--考试开始时间-->
                    <td ng-hide="isAnyTime">
                        {{item.sceneBeginTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}
                    </td>
                    <!--考试结束时间-->
                    <td ng-hide="isAnyTime">
                        {{item.sceneEndTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}
                    </td>
                    <!--计划开始时间-->
                    <td ng-show="isAnyTime">
                        {{item.beginTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}
                    </td>
                    <!--计划结束时间-->
                    <td ng-show="isAnyTime">
                        {{item.endTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}
                    </td>
                    <!--操作-->
                    <td ng-hide="isOfficial" data-toggle="tooltip" data-placement="left" title="{{generatedTitle}}">
                        <button class="btn btn-turquoise btn-sm" ng-click="buildAccounts(item)" ng-mouseover="buildTitle" ng-disabled="!isGenerated">
                            生成考生账号
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>

        <h3 class="text-center" ng-if="list.length <= 0">
            <img src="//openexamcdn.open.com.cn/openexam/static/App/images/nodata.jpg" alt="" />
            <!--<small>对不起，没有相关数据！</small>-->
        </h3>
    </div>
</div>